<!DOCTYPE html>
<html lang="pt-br">
<head>
    <!-- Codificação de caracteres -->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <!--[if lt IE 9]>
    <script type="text/javascript">
        document.createElement("nav");
        document.createElement("header");
        document.createElement("footer");
        document.createElement("section");
        document.createElement("aside");
        document.createElement("article");
    </script>
    <![endif]-->
    
    <title>{% if titulo %}{{ titulo }} - {% endif %}CtrlSYS Revenda</title>

    <!-- Style sheets -->
    <!-- <link rel="stylesheet" href="{{ STATIC_URL }}css/ui-lightness/jquery-ui.custom.min.css" /> -->
    <link rel="stylesheet" href="{{ STATIC_URL }}css/dot-luv/jquery-ui.min.css" />
    
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/grid/reset.css" />
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/grid/text.css" />
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/grid/960.css" />
    
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/style.css" />
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/top_nav.css" />
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/texto.css" />
    
    {% if css %}
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/{{ css }}.css" />
    {% endif %}
    
    {% block template_css %}{% endblock %}
    
    <!-- JavaScript - Script -->
    <script type="text/javascript" src="{{ STATIC_URL }}js/jquery.min.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/jquery-ui.custom.min.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/script.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}admin/js/admin/RelatedObjectLookups.js"></script>
    
    {% if js %}
    <script type="text/javascript" src="{{ STATIC_URL }}js/{{ js }}.js"></script>
    {% endif %}
    
    {% block template_js %}{% endblock %}
    
</head>
<body>
    <nav id="top_nav">
        <ul>
            <li><a href="/">Início</a></li>
            
            {% if user.is_authenticated %}

            {% if user.is_staff %}
            <li><a href="/admin/">Administração</a></li>
            <li><a href="/admin/registro/evento/">Eventos</a></li>
            <li><a href="/revenda/relatorio/">Relatório</a></li>
            <li><a href="/revenda/caixas/">Caixas</a></li>
            {% endif %}
            
            {% endif %}
            
            <li><a href="/sobre/">Sobre o sistema</a></li>
            <li><a href="/ajuda/">Ajuda</a></li>
            
            {% if user.is_authenticated %}
            <li id="logado_como"><i>Logado como {{request.user.username}}</i><a href="/logout/" onclick="return confirm('{% if request.user.first_name %}{{ request.user.first_name }}, você d{% else %}D{% endif%}eseja realmente sair?');">Sair</a></li>
            {% else %}
            <li>{{ "" }}</li>
            {% endif %}
        </ul>
    </nav>
    <section class="container_16" id="conteudo">
        <header class="grid_16" id="page_header">
            <a href="/" title="Início">
                <div class="left" id="branding">
                    <img src="{{ STATIC_URL }}img/logo.png" alt="CtrlSys Comercial" />
                </div>
            </a>
            <div class="left" id="banner">
                <h2>| Controle de Revenda</h2>
            </div>
        </header>
        
        <section class="grid_16" id="page_center">
            {% if header %}
            
            <h1 id="title_page">{{ header }} <span id="filter"></span></h1>
            
            {% endif %}
            
            
            <section class="grid_16 alpha omega" id="page_main">
                {% autoescape off %}
                <section id="mensagem">
                    {% if mensagem %}
                    <p class="mensagem">{{ mensagem }} <a href="javascript:fechar('mensagem');"><img src="{{ STATIC_URL }}img/icon/ok-01.png" alt="Ok" height="20" align="top" /></a></p>
                    {% endif %}
                    
                    {% if aviso %}
                    <p class="aviso">{{ aviso }} <a href="javascript:fechar('aviso');"><img src="{{ STATIC_URL }}img/icon/excluir-01.png" alt="Fechar" height="20" align="top" /></a></p>
                    {% endif %}
                </section>
                {% endautoescape %}
                
                <section id="main">
                    {% block conteudo %}{% endblock %}
                </section>
            </section>
            
        </section>
        <footer class="grid_16" id="page_footer">
            <p>
                {% if dados %}{{ dados.nome }} - {{ dados.slogan }}{% endif %} <br />
                Para entrar em contato, <a href="/contatos/">clique aqui</a>!
            </p>
        </footer>
    </section>

    <div id="aviso_popup"></div>
    </body>
</html>
